function [dpop] = logistic_t(t, pop, rates)

% Load Parameters
k=rates.k;		% Carrying Capacity

% Birth
b=rates.b;		% Birth Rate
er=rates.er;		% Fitness loss due to gene presence
ec=rates.ec;		% Fitness loss due to CRISPR presence

% Death
d=rates.d;		% Death Rate
delta=rates.delta*time(t,rates.ta);	% Increase in Death Rate due to Presence of Antibiotic

% Phi (F) Matrix of Conjugation Rates
% xy indicates gene transfer from x -> y
Fsr=rates.Fsr;
Fsc=rates.Fsc;
Frc=rates.Frc;

% Gamma (g) Matrix of Loss Rates
gr=rates.gr;		% Loss rate of gene
gc=rates.gc;		% Loss rate of CRISPR system

% S = Naturally Susceptible Population 
S=pop(1);
% R = Naturally Resistant Population (Gene Present)
R=pop(2);
% C = CRISPR-Induced Susceptible Population
C=pop(3);
% N = total population
N = S + R + C;

% Rates

%dSdt 
dpop(1,1) = b*S*(1-N/k) - (d + delta)*S - Fsr*S*R - Fsc*S*C + gr*R+gc*C;

%dRdt
dpop(2,1)= b*(1-er)*R*(1-N/k) - d*R + Fsr*S*R - Frc*R*C -gr*R;

%dCdt 
dpop(3,1) = b*(1-ec)*C*(1-N/k) - (d + delta)*C + Fsc*S*C + Frc*C*R - gc*C;

end
